import { alova } from '@/service/request';

/** get CodeDb page */
export function paginateCodeDb(params?: Api.SearchParams) {
  return alova.Get<Api.PageRow>('/dev/code/codeDb/paginate', {
    params
  });
}

/** get all CodeDb */
export function listCodeDb() {
  return alova.Get<Api.Row[]>('/dev/code/codeDb/list');
}

/** create CodeDb */
export function createCodeDb(data?: Api.Model) {
  return alova.Post<boolean>('/dev/code/codeDb/create', data);
}

/** update CodeDb */
export function updateCodeDb(data?: Api.Model) {
  return alova.Post<boolean>('/dev/code/codeDb/update', data);
}

/** delete CodeDb */
export function deleteCodeDb(params: Api.DeleteParams) {
  return alova.Post<boolean>('/dev/code/codeDb/delete', undefined, { params });
}

/** delete CodeDb */
export function batchDelCodeDb(params: Api.BatchDeleteParams) {
  return alova.Post<boolean>('/dev/code/codeDb/batchDel', undefined, { params });
}
